import { App } from 'vue'
import ElementPlus from 'element-plus'

import {
  BackTop,
  Breadcrumb,
  Dialog,
  Empty,
  Hamburger,
  Pagination,
  SvgIcon,
  SwitchDark,
  ToolSearch,
  FullScreen,
  Upload
} from '@/components'

/**
 * @description 全局组件注册
 * @param app
 */
export function registerGlobalComponents(app: App<Element>) {
  // element-ui
  app.use(ElementPlus)

  // 自定义组件
  app.component('BackTop', BackTop)
  app.component('Breadcrumb', Breadcrumb)
  app.component('TmeDialog', Dialog)
  app.component('Empty', Empty)
  app.component('Hamburger', Hamburger)
  app.component('Pagination', Pagination)
  app.component('SvgIcon', SvgIcon)
  app.component('SwitchDark', SwitchDark)
  app.component('ToolSearch', ToolSearch)
  app.component('FullScreen', FullScreen)
  app.component('TmeUpload', Upload)
}
